<template>
  <div class="about">
    <template>
      <el-form ref="editData" :model="editData" label-width="90px">
        <el-form-item label="受保人">
          <el-input v-model="editData.name"></el-input>
        </el-form-item>
        <el-form-item label="事故时间">
          <el-input v-model="editData.accidentTime"></el-input>
        </el-form-item>
        <el-form-item label="申请时间">
          <el-input v-model="editData.applyTime"></el-input>
        </el-form-item>
        <el-form-item label="保单金额">
          <el-input v-model="editData.price"></el-input>
        </el-form-item>
        <el-form-item label="理赔状态">
          <el-input v-model="editData.state"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="updateClaims({ ...editData })"
            >确人修改</el-button
          >
        </el-form-item>
      </el-form>
    </template>
  </div>
</template>
<script>
import { createNamespacedHelpers } from "vuex";
const { mapState, mapMutation, mapActions } = createNamespacedHelpers("claims");
export default {
  props: ["_id"],
  data() {
    return {};
  },
  mounted() {
    this.getClaimsById(this._id);
  },
  computed: {
    ...mapState(["addForm", "editData"]),
  },
  methods: {
    ...mapActions(["getClaimsById", "updateClaims"]),
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>
<style scoped>
/* .el-container .el-main .about {
  padding: 150px 400px 150px 300px;
} */
</style>
